// Base.cpp : implementation file
//

#include "stdafx.h"
#include "FireWall.h"
#include "Base.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CBase

IMPLEMENT_DYNAMIC(CBase, CRecordset)

CBase::CBase(CDatabase* pdb)
	: CRecordset(pdb)
{
	//{{AFX_FIELD_INIT(CBase)
	m_ID = 0;
	m_Protocol = _T("");
	m_Source = _T("");
	m_Dest = _T("");
	m_Len = _T("");
	m_SourcePort = 0;
	m_DestPort = 0;
	m_Time = _T("");
	m_Action = _T("");
	m_nFields = 9;
	//}}AFX_FIELD_INIT
	m_nDefaultType = snapshot;
}


CString CBase::GetDefaultConnect()
{
	return _T("ODBC;DSN=fire");
}

CString CBase::GetDefaultSQL()
{
	return _T("[fire]");
}

void CBase::DoFieldExchange(CFieldExchange* pFX)
{
	//{{AFX_FIELD_MAP(CBase)
	pFX->SetFieldType(CFieldExchange::outputColumn);
	RFX_Long(pFX, _T("[ID]"), m_ID);
	RFX_Text(pFX, _T("[Protocol]"), m_Protocol);
	RFX_Text(pFX, _T("[Source]"), m_Source);
	RFX_Text(pFX, _T("[Dest]"), m_Dest);
	RFX_Text(pFX, _T("[Len]"), m_Len);
	RFX_Long(pFX, _T("[SourcePort]"), m_SourcePort);
	RFX_Long(pFX, _T("[DestPort]"), m_DestPort);
	RFX_Text(pFX, _T("[Time]"), m_Time);
	RFX_Text(pFX, _T("[Action]"), m_Action);
	//}}AFX_FIELD_MAP
}

/////////////////////////////////////////////////////////////////////////////
// CBase diagnostics

#ifdef _DEBUG
void CBase::AssertValid() const
{
	CRecordset::AssertValid();
}

void CBase::Dump(CDumpContext& dc) const
{
	CRecordset::Dump(dc);
}
#endif //_DEBUG
